#ifndef GRAPHICS_HPP
#define GRAPHICS_HPP

#include "structures.hpp"
#include <SDL.h>
#include <memory>

class Graphics {
public:
    Graphics();
    ~Graphics();
    
    bool init();
    void drawDataset(const Dataset& dataset);
    void close();

private:
    static const int WINDOW_WIDTH = 800;
    static const int WINDOW_HEIGHT = 600;
    
    SDL_Window* window;
    SDL_Renderer* renderer;
    bool isRunning;
    
    void calculateScale(const Dataset& dataset);
    void transformPoint(double x, double y, int& screenX, int& screenY);
    
    double minX, maxX, minY, maxY;
    double scaleX, scaleY;
};

#endif 